<div class="row justify-content-center">
    <div class="col-8">
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
            <h2 id="jhi-wx-config-heading">Create or edit a Wx Config</h2>
            <div>
                <jhi-alert-error></jhi-alert-error>
                <div class="form-group" [hidden]="!wxConfig.id">
                    <label for="id">ID</label>
                    <input type="text" class="form-control" id="id" name="id"
                        [(ngModel)]="wxConfig.id" readonly />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_wxSourceType">Wx Source Type</label>
                    <select class="form-control" name="wxSourceType" [(ngModel)]="wxConfig.wxSourceType" id="field_wxSourceType" >
                        <option value="MP">MP</option>
                        <option value="APP">APP</option>
                        <option value="MA">MA</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_appId">App Id</label>
                    <input type="text" class="form-control" name="appId" id="field_appId"
                        [(ngModel)]="wxConfig.appId" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_appSec">App Sec</label>
                    <input type="text" class="form-control" name="appSec" id="field_appSec"
                        [(ngModel)]="wxConfig.appSec" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_aesKey">Aes Key</label>
                    <input type="text" class="form-control" name="aesKey" id="field_aesKey"
                        [(ngModel)]="wxConfig.aesKey" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_token">Token</label>
                    <input type="text" class="form-control" name="token" id="field_token"
                        [(ngModel)]="wxConfig.token" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_merchantId">Merchant Id</label>
                    <input type="text" class="form-control" name="merchantId" id="field_merchantId"
                        [(ngModel)]="wxConfig.merchantId" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_merchantKey">Merchant Key</label>
                    <input type="text" class="form-control" name="merchantKey" id="field_merchantKey"
                        [(ngModel)]="wxConfig.merchantKey" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_hello">Hello</label>
                    <input type="text" class="form-control" name="hello" id="field_hello"
                        [(ngModel)]="wxConfig.hello" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_openId">Open Id</label>
                    <input type="text" class="form-control" name="openId" id="field_openId"
                        [(ngModel)]="wxConfig.openId" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_accessToken">Access Token</label>
                    <input type="text" class="form-control" name="accessToken" id="field_accessToken"
                        [(ngModel)]="wxConfig.accessToken" />
                </div>
                <div class="form-group">
                    <label class="form-control-label" for="field_tokenExpiresTime">Token Expires Time</label>
                    <input type="number" class="form-control" name="tokenExpiresTime" id="field_tokenExpiresTime"
                        [(ngModel)]="wxConfig.tokenExpiresTime" />
                </div>

            </div>
            <div>
                <button type="button" id="cancel-save" class="btn btn-secondary"  (click)="previousState()">
                    <fa-icon [icon]="'ban'"></fa-icon>&nbsp;<span>Cancel</span>
                </button>
                <button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
                    <fa-icon [icon]="'save'"></fa-icon>&nbsp;<span>Save</span>
                </button>
            </div>
        </form>
    </div>
</div>
